home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 406_01 / atoc / error.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-11-09  |  949 b   |  31 lines

  1. /*=========================================================================
  2.  
  3.     ATOC error/warning module
  4.  
  5. =========================================================================*/
  6.  
  7. #include <stdio.h>
  8. #include "atoc.h"
  9.  
  10.  
  11. /*-------------------------------------------------------------------------
  12. error( s ) handles the error message.
  13. -------------------------------------------------------------------------*/
  14. error( s )
  15. char *s;
  16. {
  17.     printf( "%s\n", buffer );
  18.     printf( "%s:%d: ERROR: %s\n", filename, linenumber, s );
  19.     exitcode = 1;
  20. }
  21. /*-------------------------------------------------------------------------
  22. warning( s ) handles the warning message.
  23. -------------------------------------------------------------------------*/
  24. warning( s )
  25. char *s;
  26. {
  27.     printf( "%s\n", buffer );
  28.     printf( "%s:%d: WARNING: %s\n", filename, linenumber, s );
  29. }
  30. /*=======================================================================*/
  31.